"bazel-contrib/rules_oci"

module(
    name = "rules_oci",
    version = "2.0.0-alpha3",
    compatibility_level = 1,
)

bazel_dep(name = "aspect_bazel_lib", version = "2.7.2")
bazel_dep(name = "bazel_skylib", version = "1.5.0")
bazel_dep(name = "platforms", version = "0.0.8")
bazel_dep(name = "bazel_features", version = "1.10.0")

oci = use_extension("//oci:extensions.bzl", "oci")
oci.toolchains()
use_repo(oci, "oci_crane_toolchains", "oci_regctl_toolchains")

register_toolchains("@oci_crane_toolchains//:all", "@oci_regctl_toolchains//:all")

# Workaround https://github.com/aspect-build/bazel-lib/pull/832
zstd = use_extension("@aspect_bazel_lib//lib:extensions.bzl", "toolchains")
zstd.zstd()
use_repo(zstd, "zstd_toolchains")

register_toolchains("@zstd_toolchains//:all")

bazel_lib = use_extension("@aspect_bazel_lib//lib:extensions.bzl", "toolchains")
bazel_lib.jq()
bazel_lib.tar()
use_repo(bazel_lib, "bsd_tar_toolchains", "jq_toolchains")

# Dev dependencies

bazel_dep(name = "rules_go", version = "0.46.0", dev_dependency = True, repo_name = "io_bazel_rules_go")
bazel_dep(name = "rules_pkg", version = "0.7.0", dev_dependency = True)
bazel_dep(name = "gazelle", version = "0.35.0", dev_dependency = True, repo_name = "bazel_gazelle")
bazel_dep(name = "bazel_skylib_gazelle_plugin", version = "1.4.1", dev_dependency = True)
bazel_dep(name = "container_structure_test", version = "1.16.0", dev_dependency = True)
